package com.itheima.config;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration(proxyBeanMethods = true)
public class MyConfig {

    @Bean
//    @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)//原生对象生成方式
//    @Scope(value = ConfigurableBeanFactory.SCOPE_SINGLETON)//单例对象生成方式(默认值)
    public Bean1 bean1(){
        return new Bean1();
    }
}
